package rsj.api.account.entity;

import com.alibaba.fastjson.annotation.JSONField;
import common.checkgroup.AddGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import rsj.api.user.entity.UserAccount;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 生成账号
 *
 * @author yuanqinglong
 * @since 2021/7/16 9:56
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AccountInformation {

    /**
     * 创建机构信息
     */
    @Valid
    @JSONField(name = "org")
    @NotNull(message = "客户-账户类别不可为空",groups = AddGroup.class)
    private Organization organization;

    /**
     * 创建登录账号信息
     */
    @Valid
    @JSONField(name = "user")
    @NotNull(message = "账户信息不可为空",groups = AddGroup.class)
    private UserAccount userAccount;

    /**
     * 权限信息
     */
    @JSONField(name = "auth")
    private List<AccountProduct> accountProducts;

}
